import 'package:flutter/material.dart';
import 'package:FineArt/constants.dart';

class TextFieldContainer extends StatelessWidget {
  final Widget child;
  final double width;
  final double height;
  const TextFieldContainer({
    Key key,
    this.child,
    this.height=50,
    this.width=0,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    double _width=width>0?width:size.width * 0.8;
    return Container(
      height: height,
      alignment: Alignment.centerLeft,
      margin: EdgeInsets.symmetric(vertical: 8),
      padding: EdgeInsets.symmetric(horizontal: 20, vertical: 1),
      width: _width,
      decoration: BoxDecoration(
        color: bg_input,
        borderRadius: BorderRadius.circular(29),
      ),
      child: child,
    );
  }
}
